﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="DCT.Huiteng.AdminSystem.Web.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>辉腾租赁后台管理</title>
    <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css" />
    <script type="text/javascript" src="easyui/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            //===右下角菜单
            var lowerRightMenu = [
                { name: '欢迎页', url: 'welcome.htm', id: 'aWelcome' },
                { name: '修改个人信息', url: 'pages/user_modifyinfo.aspx' },
                { name: '修改密码', url: 'pages/user_modifypwd.aspx' },
                { name: '退出', url: 'pages/user_logout.aspx' }
            ];
            var areaLowerRightHTML = [];
            $.each(lowerRightMenu, function () {
                var html = "<div><a href=\"" + this.url + "\" class=\"targetframe\">" + this.name + "</a></div>";
                html = $(html);
                if (this.id) {
                    html.find("a").attr("id", this.id);
                }
                areaLowerRightHTML.push(html.html());
            });
            $("#areaLowerRight").append(areaLowerRightHTML.join("<span>&nbsp;&nbsp;|&nbsp;&nbsp;</span>"));

            //===菜单点击
            $(".targetframe").click(function (e) {
                var a = $(this);
                var name = a.html();
                var url = this.href;
                $("#iframe").attr("src", url);
                var centerPanel = $("#container").layout("panel", "center");
                centerPanel.panel("setTitle", name);
                e.preventDefault();
            });

            //===初始化，显示欢迎页
            //这么做法是为了避免延迟iframe加载页面错误，ie9有可能会出现js错误
            $("#aWelcome").click();
        });
    </script>
</head>
<body class="easyui-layout" id="container">
    <div region="north" style="height: 50px; vertical-align: middle" border="false">
        <h3>
            深圳市辉腾汽车租赁后台管理系统</h3>
    </div>
    <div region="south" style="height: 25px;" border="false">
        <table style="width: 100%">
            <tr>
                <td>
                    登录用户:xxx&nbsp;&nbsp;|&nbsp;&nbsp;登录时间：<%= DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") %>
                </td>
                <td id="areaLowerRight" style="text-align: right">                   
                </td>
            </tr>
        </table>
    </div>
    <div region="west" title="系统菜单" style="width: 200px;" style="overflow: hidden;">
        <div id="menu" class="easyui-accordion" fit="true" animate="false">
            <%= GenerateMenuHTML() %>
        </div>
    </div>
    <div region="center" title="欢迎页" style="overflow: hidden;">
        <iframe id="iframe" width="100%" height="100%" frameborder="0"
            style="padding: 0; margin: 0" scrolling="auto"></iframe>
    </div>
</body>
</html>
